﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Security.Principal;
namespace WebServer
{
    /// <summary>
    /// Interface for a class that handles requests
    /// </summary>
    public interface IHttpRequestHandler
    {
        /// <summary>
        /// Handles a GET request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        /// <param name="user">The detected users identity</param>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
        void Get(HttpListenerRequest request, HttpListenerResponse response, IPrincipal user);
        /// <summary>
        /// Handles a POST request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        /// <param name="user">The detected users identity</param>
        void Post(HttpListenerRequest request, HttpListenerResponse response, IPrincipal user);
        /// <summary>
        /// Handles a PUT request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        /// <param name="user">The detected users identity</param>
        void Put(HttpListenerRequest request, HttpListenerResponse response, IPrincipal user);
        /// <summary>
        /// Handles a DELETE request
        /// </summary>
        /// <param name="request">The request object</param>
        /// <param name="response">The response object</param>
        /// <param name="user">The detected users identity</param>
        void Delete(HttpListenerRequest request, HttpListenerResponse response, IPrincipal user);
    }
}